package com.yunxin.core.domain.model.channel;

/**
 * @author zero°
 * @since 2023-07-12
 */
public interface ChannelInfoRepository {

    /**
     * 保存渠道
     * @param channelInfo channelInfo
     * @return boolean
     */
    boolean saveChannel(ChannelInfo channelInfo);

    /**
     * 更新渠道
     * @param channelInfo channelInfo
     * @return boolean
     */
    boolean updateChannel(ChannelInfo channelInfo);

    /**
     * 根据渠道code获取渠道数据
     * @param channelCode channelCode
     * @return ChannelInfo
     */
    ChannelInfo getChannelInfoByChannelCode(String channelCode);

    /**
     * 根据渠道id获取渠道数据
     * @param id id
     * @return ChannelInfo
     */
    ChannelInfo getChannelInfoByChannelId(Long id);

}
